# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=riemann-c-client
pkgver=2.0.1
pkgrel=1
pkgdesc="A C client library for the Riemann monitoring system"
url="https://git.madhouse-project.org/algernon/riemann-c-client"
arch="all"
license="LGPL-3.0-or-later"
depends_dev="protobuf-c-dev"
makedepends="$depends_dev
	autoconf
	automake
	json-c-dev
	libtool
	wolfssl-dev
	"
checkdepends="check-dev"
subpackages="
	$pkgname-libs
	$pkgname-dev
	$pkgname-doc
	"
# TODO: Remove *:: after upgrading to next version.
source="$pkgname-$pkgver-1.tar.gz::https://git.madhouse-project.org/algernon/riemann-c-client/archive/$pkgname-$pkgver.tar.gz
	wolfssl-dont-use-old-ssl-names.patch
	"
builddir="$srcdir/$pkgname"

prepare() {
	default_prepare

	autoreconf -iv
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-tls
	make
}

check() {
	make check
}

package() {
	make install DESTDIR="$pkgdir"
}

sha512sums="
3550abd818aa77a0092f0351b7acca3b6787b5a2ad49e8fab36c11cca19b5161b4fbe123358d3238df46386e214d7d4e1c44ffb4f3d790d998bbe307b6a97b32  riemann-c-client-2.0.1-1.tar.gz
d5f7d3204e7ccbcba8746a2aa5f750d1ea964f6fe4e7b1090420084e490fc976106a30ec02b7191e9f4bf24e66210c89750cd1185448005a7aaf2be082a56db9  wolfssl-dont-use-old-ssl-names.patch
"
